<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Upgrade SOGo from v2 to v3</title>
        <link rel="stylesheet" type="text/css" href="./css/markdown.css" />
    </head>
    <body>

    <div id="navigation">
    <a href="https://www.iredmail.org" target="_blank">
        <img alt="iRedMail web site"
             src="./images/logo-iredmail.png"
             style="vertical-align: middle; height: 30px;"
             />&nbsp;
        <span>iRedMail</span>
    </a>
    &nbsp;&nbsp;//&nbsp;&nbsp;<a href="./index.html">Document Index</a></div><h1 id="upgrade-sogo-from-v2-to-v3">Upgrade SOGo from v2 to v3</h1>
<div class="admonition attention">
<p class="admonition-title">Attention</p>
<p>Check out the lightweight on-premises email archiving software developed by iRedMail team: <a href="https://spiderd.io/">Spider Email Archiver</a>.</p>
</div>
<div class="toc">
<ul>
<li><a href="#upgrade-sogo-from-v2-to-v3">Upgrade SOGo from v2 to v3</a><ul>
<li><a href="#upgrade-sogo-on-rhelcentos">Upgrade SOGo On RHEL/CentOS</a></li>
<li><a href="#upgrade-sogo-on-debianubuntu">Upgrade SOGo On Debian/Ubuntu</a></li>
<li><a href="#troubleshooting">Troubleshooting</a></li>
</ul>
</li>
</ul>
</div>
<p>SOGo-3.x has a shinny new web UI, you can try the online demo here:
<a href="http://sogo.nu">http://sogo.nu</a> (search 'demo' on the page).</p>
<p>SOGo team offers support for both SOGo v3 and v2, so it's totally fine if you
want to stick to SOGo-2.x. In case you want to try SOGo-3.x, please try steps
below.</p>
<h2 id="upgrade-sogo-on-rhelcentos">Upgrade SOGo On RHEL/CentOS</h2>
<ul>
<li>Backup config files first:</li>
</ul>
<pre><code>mkdir -p /root/sogo-backup/{sogo,sysconfig}
cp /etc/sogo/* /root/sogo-backup/sogo/
cp /etc/sysconfig/sogo /root/sogo-backup/sysconfig/
</code></pre>
<ul>
<li>Open file <code>/etc/yum.repos.d/sogo.repo</code>, change the <code>baseurl=</code> setting to:</li>
</ul>
<pre><code>baseurl=https://packages.inverse.ca/SOGo/nightly/3/rhel/$releasever/$basearch/
</code></pre>
<ul>
<li>Remove <code>sope</code> and <code>sogo</code> packages first, then install SOGo again:</li>
</ul>
<pre><code>yum remove &quot;sope*&quot; &quot;sogo*&quot;
yum install sogo sogo-ealarms-notify sogo-tool sogo-activesync sope49-gdl1-mysql sope49-gdl1-postgresql
</code></pre>
<ul>
<li>Restore backup files:</li>
</ul>
<pre><code>cp /root/sogo-backup/sogo/* /etc/sogo/
cp /root/sogo-backup/sysconfig/sogo /etc/sysconfig/
</code></pre>
<ul>
<li>Restart SOGo and memcached services:</li>
</ul>
<pre><code>service memcached restart
service sogod restart
</code></pre>
<h2 id="upgrade-sogo-on-debianubuntu">Upgrade SOGo On Debian/Ubuntu</h2>
<ul>
<li>Backup config files first:</li>
</ul>
<pre><code>mkdir -p /root/sogo-backup/{sogo,default}
cp /etc/sogo/* /root/sogo-backup/sogo/
cp /etc/default/sogo /root/sogo-backup/default/
</code></pre>
<ul>
<li>
<p>Open file <code>/etc/apt/sources.list</code>,</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Please make sure you have correct distribution name (the <code>jessie</code>, <code>xenial</code> in examples below) in <code>/etc/apt/sources.list</code>.</p>
</div>
<ul>
<li>On Debian, make sure you have SOGo repo like below: <code>https://packages.inverse.ca/SOGo/nightly/3/debian jessie jessie</code></li>
<li>On Ubuntu, make sure you have SOGo repo like below: <code>https://packages.inverse.ca/SOGo/nightly/3/ubuntu xenial xenial</code></li>
</ul>
</li>
<li>
<p>Remove <code>sope</code> and <code>sogo</code> packages first, then install SOGo again:</p>
</li>
</ul>
<pre><code>apt-get remove &quot;libsope*&quot; &quot;sogo*&quot;

apt-get update
apt-get install sogo sogo-activesync sope4.9-gdl1-mysql sope4.9-gdl1-postgresql
</code></pre>
<ul>
<li>Restore backup files:</li>
</ul>
<pre><code>cp /root/sogo-backup/sogo/* /etc/sogo/
cp /root/sogo-backup/default/sogo /etc/default/
</code></pre>
<ul>
<li>Make sure SOGo log file is owned by SOGo daemon user and group:<ul>
<li>On Linux, user/group names are: <code>sogo:sogo</code>.</li>
<li>on FreeBSD, user/group names are: <code>sogod:sogod</code>.</li>
<li>on OpenBSD, user/group names are: <code>_sogo:_sogo</code>.</li>
</ul>
</li>
</ul>
<pre><code>chown sogo:sogo /var/log/sogo/sogo.log
</code></pre>
<ul>
<li>Restart SOGo and memcached services:</li>
</ul>
<pre><code>service memcached restart
service sogo restart
</code></pre>
<h2 id="troubleshooting">Troubleshooting</h2>
<p>If SOGo doesn't work as expected, please check its log file
<code>/var/log/sogo/sogo.log</code>. If you don't understand what the error message means,
please extract related error message and post to our online support forum:
<a href="https://forum.iredmail.org/">https://forum.iredmail.org/</a>.</p><div class="footer">
    <p style="text-align: center; color: grey;">All documents are available in <a href="https://github.com/iredmail/docs/">GitHub repository</a>, and published under <a href="http://creativecommons.org/licenses/by-nd/3.0/us/" target="_blank">Creative Commons</a> license. You can <a href="https://github.com/iredmail/docs/archive/master.zip">download the latest version</a> for offline reading. If you found something wrong, please do <a href="https://www.iredmail.org/contact.html">contact us</a> to fix it.</p>
</div></body></html>